package com.wjs.myspring.service.imp;

import com.wjs.myspring.dao.HelloDao;
import com.wjs.myspring.dao.imp.HelloDaoImp;
import com.wjs.myspring.factory.BeanFactory;
import com.wjs.myspring.service.HelloService;

import java.util.List;

public class HelloServiceImp implements HelloService {
    public HelloServiceImp(){
        for (int i = 0; i < 10; i++) {
            System.out.println(BeanFactory.getDao("HelloDao"));
        }
    }
    HelloDao helloDao= (HelloDao) BeanFactory.getDao("HelloDao");
    @Override
    public List<String> findAll() {
        return helloDao.findAll();
    }
}
